<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="blank">
    <meta name="format-detection" content="telephone=no, email=no">
    <meta name="msapplication-tap-highlight" content="no">
    <title><{config_item('website_title')}></title>
</head>
<body>
<div class="wrap">
</div>
<!-- IE8及以下支持JSON -->
<!--[if lt IE 9]>
<script src="https://g.alicdn.com/aliww/ww/json/json.js" charset="utf-8"></script>
<![endif]-->
<script src="https://g.alicdn.com/aliww/h5.openim.sdk/1.0.6/scripts/wsdk.js"></script>
<script language="JavaScript">
    var sdk = new WSDK();

    sdk.Base.login({
        uid:'<{$member_data.uid}>',
        appkey: '<{config_item("im_appkey")}>',
        credential: '<{$member_data.uid}>',
        timeout: 4000,
        success: function(data){
            //console.log('login success', data);
            sdk.Chat.setReadState({
                touid: '<{$shop_data.touid}>',
                timestamp: Math.floor((+new Date())/1000),
                success: function(data){
                    //console.log('设置已读成功', data);
                },
                error: function(error){
                    //console.log('设置已读失败', error);
                }
            });
        },
        error: function(error){
            //layer.msg('登录失败');
        }
    });
</script>
</body>
</html>